package net.zio.kamenriderzioaddon.init;

import software.bernie.geckolib3.renderers.geo.GeoArmorRenderer;

import net.zio.kamenriderzioaddon.item.ZikudriverwithgeizwatchzhuanItem;
import net.zio.kamenriderzioaddon.item.ZikudriverwithgeizwatchItem;
import net.zio.kamenriderzioaddon.item.ZikudriverwithgeizrevivegoretsuwatchzhuanItem;
import net.zio.kamenriderzioaddon.item.ZikudriverwithgeizrevivegoretsuwatchItem;
import net.zio.kamenriderzioaddon.item.ZikudriverwithgeizmajestywatchzhuanItem;
import net.zio.kamenriderzioaddon.item.ZikudriverwithgeizmajestywatchItem;
import net.zio.kamenriderzioaddon.item.ZikudriverItem;
import net.zio.kamenriderzioaddon.item.GeizmajestyItem;
import net.zio.kamenriderzioaddon.item.GeizReviveGoretsuItem;
import net.zio.kamenriderzioaddon.item.GeizItem;
import net.zio.kamenriderzioaddon.client.renderer.ZikudriverwithgeizwatchzhuanArmorRenderer;
import net.zio.kamenriderzioaddon.client.renderer.ZikudriverwithgeizwatchArmorRenderer;
import net.zio.kamenriderzioaddon.client.renderer.ZikudriverwithgeizrevivegoretsuwatchzhuanArmorRenderer;
import net.zio.kamenriderzioaddon.client.renderer.ZikudriverwithgeizrevivegoretsuwatchArmorRenderer;
import net.zio.kamenriderzioaddon.client.renderer.ZikudriverwithgeizmajestywatchzhuanArmorRenderer;
import net.zio.kamenriderzioaddon.client.renderer.ZikudriverwithgeizmajestywatchArmorRenderer;
import net.zio.kamenriderzioaddon.client.renderer.ZikudriverArmorRenderer;
import net.zio.kamenriderzioaddon.client.renderer.GeizmajestyArmorRenderer;
import net.zio.kamenriderzioaddon.client.renderer.GeizReviveGoretsuArmorRenderer;
import net.zio.kamenriderzioaddon.client.renderer.GeizArmorRenderer;
import net.zio.kamenriderzioaddon.KamenRiderZioAddonMod;

import net.minecraftforge.registries.RegistryObject;
import net.minecraftforge.registries.ForgeRegistries;
import net.minecraftforge.registries.DeferredRegister;
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
import net.minecraftforge.fml.event.lifecycle.FMLConstructModEvent;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.eventbus.api.IEventBus;
import net.minecraftforge.client.event.EntityRenderersEvent;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.api.distmarker.Dist;

import net.minecraft.world.item.Item;
import net.minecraft.world.entity.EquipmentSlot;

@Mod.EventBusSubscriber(modid = KamenRiderZioAddonMod.MODID, bus = Mod.EventBusSubscriber.Bus.MOD)
public class KamenRiderZioAddonModGeckoLibArmors {
	@SubscribeEvent
	public static void register(FMLConstructModEvent event) {
		IEventBus bus = FMLJavaModLoadingContext.get().getModEventBus();
		event.enqueueWork(() -> {
			KamenRiderZioAddonModGeckoLibArmors.GeckoLibArmorItems.REGISTRY.register(bus);
		});
	}

	@OnlyIn(Dist.CLIENT)
	@SubscribeEvent
	public static void registerRenderers(EntityRenderersEvent.AddLayers event) {
		GeoArmorRenderer.registerArmorRenderer(GeizItem.class, () -> new GeizArmorRenderer());
		GeoArmorRenderer.registerArmorRenderer(ZikudriverItem.class, () -> new ZikudriverArmorRenderer());
		GeoArmorRenderer.registerArmorRenderer(ZikudriverwithgeizwatchItem.class, () -> new ZikudriverwithgeizwatchArmorRenderer());
		GeoArmorRenderer.registerArmorRenderer(ZikudriverwithgeizwatchzhuanItem.class, () -> new ZikudriverwithgeizwatchzhuanArmorRenderer());
		GeoArmorRenderer.registerArmorRenderer(GeizmajestyItem.class, () -> new GeizmajestyArmorRenderer());
		GeoArmorRenderer.registerArmorRenderer(ZikudriverwithgeizmajestywatchItem.class, () -> new ZikudriverwithgeizmajestywatchArmorRenderer());
		GeoArmorRenderer.registerArmorRenderer(ZikudriverwithgeizmajestywatchzhuanItem.class, () -> new ZikudriverwithgeizmajestywatchzhuanArmorRenderer());
		GeoArmorRenderer.registerArmorRenderer(GeizReviveGoretsuItem.class, () -> new GeizReviveGoretsuArmorRenderer());
		GeoArmorRenderer.registerArmorRenderer(ZikudriverwithgeizrevivegoretsuwatchItem.class, () -> new ZikudriverwithgeizrevivegoretsuwatchArmorRenderer());
		GeoArmorRenderer.registerArmorRenderer(ZikudriverwithgeizrevivegoretsuwatchzhuanItem.class, () -> new ZikudriverwithgeizrevivegoretsuwatchzhuanArmorRenderer());
	}

	public class GeckoLibArmorItems {
		public static final DeferredRegister<Item> REGISTRY = DeferredRegister.create(ForgeRegistries.ITEMS, KamenRiderZioAddonMod.MODID);
		public static final RegistryObject<GeizItem> GEIZ_HELMET = REGISTRY.register("geiz_helmet", () -> new GeizItem(EquipmentSlot.HEAD, new Item.Properties().tab(null)));

		public static final RegistryObject<GeizItem> GEIZ_CHESTPLATE = REGISTRY.register("geiz_chestplate", () -> new GeizItem(EquipmentSlot.CHEST, new Item.Properties().tab(null)));
		public static final RegistryObject<GeizItem> GEIZ_BOOTS = REGISTRY.register("geiz_boots", () -> new GeizItem(EquipmentSlot.FEET, new Item.Properties().tab(null)));
		public static final RegistryObject<ZikudriverItem> ZIKUDRIVER_LEGGINGS = REGISTRY.register("zikudriver_leggings", () -> new ZikudriverItem(EquipmentSlot.LEGS, new Item.Properties().tab(KamenRiderZioAddonModTabs.TAB_KAMENRIDERZIOADDONITEMS)));
		public static final RegistryObject<ZikudriverwithgeizwatchItem> ZIKUDRIVERWITHGEIZWATCH_LEGGINGS = REGISTRY.register("zikudriverwithgeizwatch_leggings",
				() -> new ZikudriverwithgeizwatchItem(EquipmentSlot.LEGS, new Item.Properties().tab(null)));
		public static final RegistryObject<ZikudriverwithgeizwatchzhuanItem> ZIKUDRIVERWITHGEIZWATCHZHUAN_LEGGINGS = REGISTRY.register("zikudriverwithgeizwatchzhuan_leggings",
				() -> new ZikudriverwithgeizwatchzhuanItem(EquipmentSlot.LEGS, new Item.Properties().tab(null)));
		public static final RegistryObject<GeizmajestyItem> GEIZMAJESTY_HELMET = REGISTRY.register("geizmajesty_helmet", () -> new GeizmajestyItem(EquipmentSlot.HEAD, new Item.Properties().tab(null)));

		public static final RegistryObject<GeizmajestyItem> GEIZMAJESTY_CHESTPLATE = REGISTRY.register("geizmajesty_chestplate", () -> new GeizmajestyItem(EquipmentSlot.CHEST, new Item.Properties().tab(null)));
		public static final RegistryObject<GeizmajestyItem> GEIZMAJESTY_BOOTS = REGISTRY.register("geizmajesty_boots", () -> new GeizmajestyItem(EquipmentSlot.FEET, new Item.Properties().tab(null)));
		public static final RegistryObject<ZikudriverwithgeizmajestywatchItem> ZIKUDRIVERWITHGEIZMAJESTYWATCH_LEGGINGS = REGISTRY.register("zikudriverwithgeizmajestywatch_leggings",
				() -> new ZikudriverwithgeizmajestywatchItem(EquipmentSlot.LEGS, new Item.Properties().tab(null)));
		public static final RegistryObject<ZikudriverwithgeizmajestywatchzhuanItem> ZIKUDRIVERWITHGEIZMAJESTYWATCHZHUAN_LEGGINGS = REGISTRY.register("zikudriverwithgeizmajestywatchzhuan_leggings",
				() -> new ZikudriverwithgeizmajestywatchzhuanItem(EquipmentSlot.LEGS, new Item.Properties().tab(null)));
		public static final RegistryObject<GeizReviveGoretsuItem> GEIZ_REVIVE_GORETSU_HELMET = REGISTRY.register("geiz_revive_goretsu_helmet",
				() -> new GeizReviveGoretsuItem(EquipmentSlot.HEAD, new Item.Properties().tab(KamenRiderZioAddonModTabs.TAB_KAMENRIDERZIOADDONITEMS)));

		public static final RegistryObject<GeizReviveGoretsuItem> GEIZ_REVIVE_GORETSU_CHESTPLATE = REGISTRY.register("geiz_revive_goretsu_chestplate",
				() -> new GeizReviveGoretsuItem(EquipmentSlot.CHEST, new Item.Properties().tab(KamenRiderZioAddonModTabs.TAB_KAMENRIDERZIOADDONITEMS)));
		public static final RegistryObject<GeizReviveGoretsuItem> GEIZ_REVIVE_GORETSU_BOOTS = REGISTRY.register("geiz_revive_goretsu_boots",
				() -> new GeizReviveGoretsuItem(EquipmentSlot.FEET, new Item.Properties().tab(KamenRiderZioAddonModTabs.TAB_KAMENRIDERZIOADDONITEMS)));
		public static final RegistryObject<ZikudriverwithgeizrevivegoretsuwatchItem> ZIKUDRIVERWITHGEIZREVIVEGORETSUWATCH_LEGGINGS = REGISTRY.register("zikudriverwithgeizrevivegoretsuwatch_leggings",
				() -> new ZikudriverwithgeizrevivegoretsuwatchItem(EquipmentSlot.LEGS, new Item.Properties().tab(null)));
		public static final RegistryObject<ZikudriverwithgeizrevivegoretsuwatchzhuanItem> ZIKUDRIVERWITHGEIZREVIVEGORETSUWATCHZHUAN_LEGGINGS = REGISTRY.register("zikudriverwithgeizrevivegoretsuwatchzhuan_leggings",
				() -> new ZikudriverwithgeizrevivegoretsuwatchzhuanItem(EquipmentSlot.LEGS, new Item.Properties().tab(null)));
	}
}
